#pragma once

#include <AVUITriggerAction.h>

namespace AVUI {

class Storyboard;

class SoundPlayerAction : public TriggerAction
{
public:
    SoundPlayerAction() { }

    DECLARE_ELEMENT(SoundPlayerAction, TriggerAction);

    DECLARE_DEPENDENCY_PROPERTY_BEGIN(Source);
        DECLARE_ATTRIBUTE_CONTENTPROPERTY();
    DECLARE_DEPENDENCY_PROPERTY_END();
    TRefCountedPtr<String> get_Source() { return (String*)(Object*)GetValue(get_SourceProperty()); }
    void set_Source(String* pValue) { return SetValue(get_SourceProperty(), (Object*)pValue); }

    virtual void Invoke(FrameworkElement* pFE, FrameworkContentElement* pFCE, Style* pTargetStyle, FrameworkTemplate* pTargetTemplate, int layer) AVUI_OVERRIDE;
    virtual void Invoke(FrameworkElement* pElement) AVUI_OVERRIDE;

    void Seal();

private:
    static void StaticConstructor();

    void Begin(DependencyObject* pTarget, int layer);

};


}; // namespace AVUI
